class Register {
	public static void main(String[] args) {
		Student s1 = new Student("John");
		Student s2 = new Student("Mary");
		Student s3 = new Student("Mike");
		Student s4 = new Student("Joe");
		Student s5 = new Student("Lisa");
		
		Professor p1 = new Professor("Smith");
		Professor p2 = new Professor("Johnson");
		
		Course c1 = new Course("CSCI 2020U");
		Course c2 = new Course("ENGR 1000U");
		
		c1.taughtBy(p1);
		c2.taughtBy(p2);
		
		c1.enroll(s1);
		c1.enroll(s2);
		c1.enroll(s3);
		
		c2.enroll(s3);
		c2.enroll(s4);
		c2.enroll(s5);
		
		print(c1);
		print(c2);
	}
	
	public static void print(Course c) {
		System.out.println(c + " taught by " + c.prof);
		for(Student s : c.students)
			System.out.println("\t" + s);
	}
}
